﻿using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using BLL.Model.Apply;
using BLL.Model.Menu;
using BLL.Model.OperatingSystem;
using BLL.Model.User;

namespace BLL.DbAccess
{
    public class DefaultContext : DbContext
    {
        public DefaultContext()
            : base("waycloud")
        {

        }

        public DbSet<UserInfo> UserInfoContext { get; set; }

        public DbSet<OperatingSystemInfo> OperatingSystemInfoContext { get; set; }

        public DbSet<ApplyInfo> ApplyInfoContext { get; set; }

        public DbSet<RoleInfo> RoleInfoContext { get; set; }

        public DbSet<MenuInfo> MenuInfoContext { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();

            base.OnModelCreating(modelBuilder);
        }

    }
}